const path = require('path')

const TEST_ROOT = 'tests'

module.exports = {
  rootDir: path.resolve(process.cwd(), TEST_ROOT),
  testMatch: ['**/*.test.js'],
  transform: {
    '^.+\\.js$': path.resolve(__dirname, './preprocess.js'),
  },
  moduleNameMapper: {
    "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": path.resolve(__dirname, './fileMock.js'),
    "\\.(css|less)$": path.resolve(__dirname, './styleMock.js'),
  }
}